import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';

@Entity('dish_spec_groups')
export class specs {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  admins_id: number;

  @Column({ default: null })
  name: string;

  @Column({ default: null})
  type: string;
 
  @Column({ default: null,type:'json' })
  spec_list: string;

  @Column({ default: null,type:'json' })
  sku_list: string;

  @Column({ default: 0})
  sort_order: number;

  @Column({default: () => 'CURRENT_TIMESTAMP'})
  create_time: Date;

  @Column({default: () => 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP'})
  update_time: Date;
}
